home *** CD-ROM | disk | FTP | other *** search
- #include <howard.h>
- #include <menuhk.h>
- #include <video.h>
- #include <color.h>
- #include <keyboard.h>
- #include <keycode.h>
- #include <stringhk.h>
- #include <datehk.h>
- #include <timehk.h>
- #include <ibm.h>
- #include <filehk.h>
-
- #include <alloc.h>
- #include <string.h>
- #include <stdio.h>
- #include <dos.h>
-
- void goodbye(void);
-
- main()
- {
- char key=0, cmdkey[9], keystr[20];
- char *cmd[9] = { "Video", "Keyboard", "String",
- "Time", "Date", "IBM",
- "File", "Menu", "Quit" };
- char *msg[9] = { "Screen routines", "Keyboard routines",
- "String manipulations", "Time functions",
- "Date functions", "IBM machine specific functions",
- "File functions", "Menu functions",
- "Quit this demo" };
- int cmdcol[9], msglen[9];
- int i;
-
- cls();
- set_color(BROWN|B_BLACK);
- gotoxy(0,5);
- putstr((byte *)"This is a sample of TCHK's slash bar menu function");
- lotus_setup(9,cmd,cmdkey,cmdcol,msg,msglen);
- key = menu_lotus(9,cmdkey,cmd,cmdcol,msg,msglen,LCYAN,LWHITE|B_RED,2,TRUE,0,72,LGREEN);
- set_color(BROWN);
- putsay(6,0,(byte *)"You selected ");
- for (i=0; i<9; i++)
- if (key == cmdkey[i]) {
- strcpy(keystr,cmd[i]);
- break;
- }
- set_color(LRED);
- putsay(6,13,keystr);
- goodbye();
- }
-
-
- void goodbye(void)
- {
- extern byte frame2[9];
-
- set_color(BLACK|B_BLUE);
- box(8,7,21,50,frame2);
- set_color(LCYAN);
- putsay(10,10,(byte *)"This is but a small sample of TCHK");
- putsay(12,10,(byte *)"If you like this library, you can");
- set_color(LRED|BLINK);
- putsay(13,10,(byte *)"REGISTER");
- set_color(LCYAN);
- putsay(13,19,(byte *)"for the measly sum of ");
- set_color(LRED|BLINK);
- putsay(13,41,(byte *)"$15");
- set_color(LCYAN);
- putsay(13,44,(byte *)".");
- putsay(15,10,(byte *)"Registered users get all size memory");
- putsay(16,10,(byte *)"models instead of just the small model");
- putsay(17,10,(byte *)"distributed publicly.");
- putsay(19,10,(byte *)"Check out TCHK.DOC for more information");
- }